﻿using Dapper_Core.Common;
using Quartz;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Dapper_Core.AutoJob
{
    public class QuartzJob : IJob
    {
        public async Task Execute(IJobExecutionContext context)
        {
            var jobKey = context.JobDetail.Key;//获取job信息
            var triggerKey = context.Trigger.Key;//获取trigger信息

            NlogUtility.WriteFileLog($"{DateTime.Now} QuartzJob:==>>自动执行. jobKey={jobKey.Name} | triggerKey={triggerKey.Name}", jobKey.Name);
            await Task.CompletedTask;
        }
    }
}
